package com.mioto.ld.module.knowledge.service;

import com.mioto.ld.module.knowledge.model.KnowledgeBase;
import com.mioto.ld.module.knowledge.model.KnowledgeBasePagerVO;

import java.util.List;

/**
 * IKnowledgeBaseService
 *
 * @author mioto
 * @date 2024-05-14 19:19:36
 */
public interface IKnowledgeBaseService{

    /**
     * 根据条件查询列表
     * @param knowledgeBase
     * @return
     */
    List<KnowledgeBase> findList(KnowledgeBase knowledgeBase);

    /**
     * 根据列名和对应的值查询对象
     * @param column
     * @param value
     * @return
     */
    KnowledgeBase findByColumn(String column, Object value);

    /**
     * 新增对象
     * @param knowledgeBase
     * @return
     */
    int insert(KnowledgeBase knowledgeBase);

    /**
     * 修改对象
     * @param knowledgeBase
     * @return
     */
    int update(KnowledgeBase knowledgeBase);

    /**
     * 修改对象,忽略空值
     * @param knowledgeBase
     * @return
     */
    int updateIgnoreNull(KnowledgeBase knowledgeBase);

    /**
     * 根据列名和对应的值删除对象
     * @param column
     * @param value
     * @return
     */
    int deleteByColumn(String column, Object value);

    /**
     * 根据主键列表批量删除
     * @param ids
     * @return
     */
    int batchDelete(Integer[] ids);

    List<KnowledgeBasePagerVO> findPager(KnowledgeBase knowledgeBase);

    List<KnowledgeBase> batchFind(Integer[] ids);
}